//package github.ziwukun.jsonql.analysis;
//
//import org.junit.Test;
//
//import github.ziwukun.jsonql.lang.JsonQLSelect;
//import github.ziwukun.jsonql.orm.ContainerDefine;
//import github.ziwukun.jsonql.orm.anno.Container;
//import github.ziwukun.jsonql.orm.anno.ContainerField;
//import github.ziwukun.jsonql.orm.anno.ContainerType;
//import github.ziwukun.jsonql.orm.anno.Document;
//import github.ziwukun.jsonql.orm.anno.Id;
//import github.ziwukun.jsonql.orm.anno.Root;
//
//public class ContainerAndJsonQLSelectTest001 {
//	
//	/**
//	 * 获取单个容器直接相关的JsonQL语句
//	 */
//	@Test
//	public void test001() {
//		ContainerDefine user = ContainerDefine.createInstanceFromRootClass(User.class);
//		JsonQLSelect select = JsonQLSelect.createBuilder().props("name", "age").prop("address", address -> {
//			address.props("city");
//		}).build();
//		
//		ContainerAndSelect containerAndJsonQLSelect = new ContainerAndSelect(user, select);
//		System.out.println(containerAndJsonQLSelect.singleContainerSelect().toJsonQL());
//		System.out.println(containerAndJsonQLSelect.singleContainerFieldSelect().toJsonQL());
//	}
//	
//	@Root
//	@Container(type = ContainerType.MONGO)
//	static class User{
//		@Id
//		@ContainerField(name="t_name")
//		private String id;
//		@ContainerField(name="t_name")
//		private String name;
//		@ContainerField(name="t_age")
//		private String age;
//		@ContainerField
//		private Address address;
//	}
//	
//	//@Container(type = ContainerType.MYSQL)
//	@Document
//	static class Address{
//		@ContainerField
//		private String province;
//		@ContainerField(name="t_city")
//		private String city;
//		@ContainerField
//		private String district;
//	}
//}
